/** @file objects_dialog.h
    @brief Objects dialog */
#ifndef OBJECTS_DIALOG_H
#define OBJECTS_DIALOG_H

#include "ui_objects_dialog.h"
#include "render_window.h"

#include <QObject>
#include <QKeyEvent>
#include <QPushButton>
#include <QSignalMapper>

QT_BEGIN_NAMESPACE

class ObjectsDialog : public QDialog, private Ui::obj_dialog
{
    Q_OBJECT

    public:
        ObjectsDialog( QWidget *parent = 0 );

        void init();

    public slots:
        void selection_changed( const QItemSelection &r_sel, const QItemSelection &r_desel );

        void apply_changes();
        void pick_object();
        void pick_color();

    protected:
        void setupActions();
        void setupObjList();

        void add_color( const Ogre::ColourValue &r_col );
        void add_colors();
        void clear_colors();

        Ogre::ColourValue m_color;
        bool m_ignore_changes;
};

QT_END_NAMESPACE

#endif // OBJECTS_DIALOG_H
